
<nav class="navbar navbar-expand-md fixed-top navbar-light bg-light">
  <div class="container">
    <a class="navbar-brand" href="{{ "/" | relative_url }}">
      <img src="{{ "/images/icon_brand_navbar.svg" | relative_url }}" width="30" height="30" alt="{{ site.title | escape }}">
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
      <ul class="navbar-nav mr-auto">

{%- assign pru = page.url | relative_url -%}

        {%- for item in site.data.menus["main"] -%}

{%- assign iru = item.url | relative_url -%}

        <li class="nav-item">
          <a
              class="nav-link {%- if pru == iru %} active{% endif -%}"
              href="{{ item.url | relative_url }}">{{ item.name }}</a>
        </li>
        {% endfor -%}

      </ul>
    </div>
  </div>
</nav>